package com.xiangge.zuoye2;

public class Demo7 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,6};
        int[] brr = {1,2,3,4,5,6};

        if (xiangtong(arr,brr)){
            System.out.println("相同");
        }else {
            System.out.println("不相同");
        }
    }

    public static boolean xiangtong(int[] arr, int[] brr) {
        if (arr.length!=brr.length){
            return false;
        }
        for (int i = 0; i < arr.length; i++) {
            if (arr[0]!=brr[0]){
                return false;
            }
        }
        return true;
    }
}
